//
//  PostUploadImageDataBase.h
//  WULIHH
//
//  Created by tang on 16/5/3.
//  Copyright © 2016年 tang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Header.h"

typedef void(^getImageInfo)(NSData *imageData, NSDictionary *qipaoINfo);
typedef void(^getImageSelectInfo)(NSData *imageData, NSDictionary *qipaoInfoDic);
typedef void(^getAllImageInfo)(NSArray *sourceImageDataArray, NSArray *uploadImageDataArray, NSArray *connectIDStringArray);
@interface PostUploadImageDataBase : NSObject


SINGLETON_INTERFACE(PostUploadImageDataBase);



//打开数据库
- (void)openDataBase;


//插入数据(事物写入)
//- (void)insertID:(NSString *)ISString withUpLoadImage:(NSData *)uploadImageData withConnectID:(NSString *)connectIDString withShowImage:(NSData *)showImageData;
- (void)insertModelwithImageArray:(NSArray *)imageArray withCOnnectIDArray:(NSArray *)IDArray;


//读取图片信息
- (void)readImageWithSelect:(NSString *)selectString  wirhInfo:(getImageInfo)callBack;



//读取选中照片保存上一张照片
- (void)readCurrentImageWithSelect:(NSString *)currentString withLastString:(NSString *)lastString withLastIMage:(NSData *)lastImageData withLastQiapo:(NSDictionary *)lasQipaoInfo withCallBack:(getImageSelectInfo)GetIMageBack;




- (void)readAllImageFromDB:(getAllImageInfo)AllCallBack;


//添加图片
- (void)addPhotoWithImageArray:(NSArray *)imageArray withConnectIDArray:(NSArray *)IDArray;


@end
